import 'package:tender_flutter/page/home/model/notice_entity.dart';

noticeEntityFromJson(NoticeEntity data, Map<String, dynamic> json) {
	if (json['m'] != null) {
		data.m = json['m'] is String
				? int.tryParse(json['m'])
				: json['m'].toInt();
	}
	if (json['h1'] != null) {
		data.h1 = json['h1'].toString();
	}
	if (json['h2'] != null) {
		data.h2 = json['h2'].toString();
	}
	if (json['h3'] != null) {
		data.h3 = json['h3'].toString();
	}
	if (json['h4'] != null) {
		data.h4 = json['h4'].toString();
	}
	if (json['h5'] != null) {
		data.h5 = json['h5'].toString();
	}
	return data;
}

Map<String, dynamic> noticeEntityToJson(NoticeEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['m'] = entity.m;
	data['h1'] = entity.h1;
	data['h2'] = entity.h2;
	data['h3'] = entity.h3;
	data['h4'] = entity.h4;
	data['h5'] = entity.h5;
	return data;
}